package com.ganzi.ganziserver.dao;

import com.ganzi.ganziserver.core.FanCollect;
import com.ganzi.ganziserver.core.SendCollect;
import com.ganzi.ganziserver.core.TempCollect;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.List;

@Repository
public interface FanCollectDao {

    public FanCollect findFanCollectById(long id)throws Exception;
    public List<FanCollect> findFanCollectByschoolId(long schoolId)throws Exception;
    public List<TempCollect> findFanCollectByschoolIdFortemp(long schoolId)throws Exception;
    public Long findFanCollectIdByschoolIdAndNumber(@Param("schoolId") long schoolId, @Param("number") int number)throws Exception;
    public Long findFanCollectIdByschoolIdAndIp(@Param("schoolId") long schoolId, @Param("ip") String ip)throws Exception;
    public List<FanCollect> findAllFanCollect()throws Exception;
    public void insertFanCollect(FanCollect fanCollect)throws Exception;
    public void updateFanCollect(FanCollect fanCollect)throws Exception;
    public void deleteFanCollect(long id)throws Exception;
    public void updateFanCollectForOnline(@Param("id") long id, @Param("state")int state,@Param("updateTime") Timestamp updateTime) throws Exception;
    public List<SendCollect> findFanCollectByschoolIdForSend(long schoolId)throws Exception;
    public List<FanCollect> findFanCollectBystate(@Param("state")int state)throws Exception;
    public int findFanCollectBystateCount(@Param("state")int state)throws Exception;
    public void changeCollectState(int state)throws Exception;


}
